package com.wisely.ch9_3_4.consumer;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.stereotype.Component;

@Component
public class ConsumerListener {

	@JmsListener(destination = "springboot-queue")
	public void p2pListener(String message) {
		System.out.println("接收到p2p消息：" + message + "<<<=====");
	}

	@JmsListener(destination = "springboot-topic", containerFactory = "topicContainerFactory")
	public void pubSubListener(String message) {
		System.out.println("订阅消息客户端1:" + message + "<<<=====");
	}

	@JmsListener(destination = "springboot-topic", containerFactory = "topicContainerFactory")
	public void pubSubListener2(String message) {
		System.out.println("订阅消息客户端2:" + message + "<<<=====");
	}

}
